﻿<UserControl
    xmlns:SilverDesigner="clr-namespace:SilverDesigner"  
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"        
    xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit"     
    x:Class="SilverDesigner.IDE"
    mc:Ignorable="d"
    d:DesignHeight="800" d:DesignWidth="1280">
    <Grid x:Name="LayoutRoot" Background="{StaticResource gradientBack1Diagonal}">
        <Grid.RowDefinitions>
            <RowDefinition Height="40" />
            <RowDefinition Height="1*" />            
            <RowDefinition Height="1*"/>
            <RowDefinition Height="20" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="50" />
            <ColumnDefinition />
            <ColumnDefinition Width="300" />
        </Grid.ColumnDefinitions>
        <SilverDesigner:ToolbarMenu x:Name="mainMenu" Grid.ColumnSpan="3" DataContext="{Binding ToolbarMenu}"  />
        <SilverDesigner:ToolboxMenu x:Name="toolboxMenu" Grid.RowSpan="2" DataContext="{Binding ToolBoxMenu}" Grid.Row="1" Grid.Column="0" />
        <SilverDesigner:EditArea Grid.Row="1" Grid.Column="1" Grid.RowSpan="2" DataContext="{Binding EditArea}" x:Name="editArea" Margin="0,0,10,0" />        
        <sdk:GridSplitter Grid.Row="1" Grid.Column="1" Grid.RowSpan="2" />
        <SilverDesigner:ObjectTree Grid.Row="1" Grid.Column="2" DataContext="{Binding EditArea.Document}" x:Name="objectTree" />
        <sdk:GridSplitter Grid.Row="1" Grid.Column="2" HorizontalAlignment="Stretch" VerticalAlignment="Bottom" />
        <SilverDesigner:PropertiesTool Grid.Row="2" Grid.Column="2" DataContext="{Binding EditArea.Document.SelectedAnyChild}" />
        <Grid Grid.Row="3" Grid.ColumnSpan="3" Background="{StaticResource gradientBack3}">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition />
            </Grid.ColumnDefinitions>
            <StackPanel Orientation="Horizontal">
                <TextBlock VerticalAlignment="Center">Zoom %</TextBlock>
                <ComboBox SelectedItem="{Binding EditArea.ZoomFactor, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" 
                                     ItemsSource="{Binding EditArea.ZoomFactors}" />
                <TextBlock Margin="5,0">
                    <Run Text="X : " />
                    <Run Text="{Binding EditArea.MousePosition.X, StringFormat=\{0:F2\}}" />
                </TextBlock>
                <TextBlock Margin="5,0">
                    <Run Text="Y : " />
                    <Run Text="{Binding EditArea.MousePosition.Y, StringFormat=\{0:F2\}}" />
                </TextBlock>
            </StackPanel>
        </Grid>        
    </Grid>
</UserControl>